package com.ywk.jedis;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.StringRedisTemplate;

/**
 * @Author zbh
 * @Date 2023/7/25
 */
@SpringBootApplication
public class JedisMainApplication {
    public static void main(String[] args) {
        SpringApplication.run(JedisMainApplication.class,args);
    }

    @Bean
    public StringRedisTemplate getRedisTemplate(RedisConnectionFactory factory){
        return new StringRedisTemplate(factory);
    }
}
